package com.bjwl.service.impl;

import com.bjwl.dao.ProperMapper;
import com.bjwl.pojo.Proper;
import com.bjwl.service.ProperService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.ArrayList;

/**
 * @Author: dzx
 * @Date:Create：in 2020/6/1 18:39
 * @Description:
 * @Modified By：
 * @Version: 1.0
 */
@Service
public class ProperServiceImpl implements ProperService {

    @Autowired
    private ProperMapper properMapper;

    @Override
    @Transactional(readOnly = true)
    public ArrayList<Proper> findAllProper() {
        return properMapper.findAllProper();
    }

    @Override
    @Transactional(readOnly = true)
    public Proper findProperById(Integer id) {
        return properMapper.findProperById(id);
    }

    @Override
    @Transactional(rollbackFor = Exception.class)
    public void upadteProperById(Proper proper) {
        properMapper.upadteProperById(proper);
    }
}
